<!-- include tpl=usercp/head title=$rs.name -->
<div class="container-fluid no-gutters main layout-main">
	<!-- include tpl=usercp/sidebar -->
	<div class="layout-right">
		<!-- include tpl=usercp/header -->
		<div class="layout-body">
			<div class="card">
				<div class="card-header">
					{$rs.title}
					<a href="{url ctrl=usercp func=media_add type=$rs.id/}" class="btn btn-primary btn-sm float-right">添加</a>
				</div>
				<div class="card-body">
					<table class="table table-striped table-hover">
					<tr>
						<th>ID</th>
						<th>图片</th>
						<th>名称/文件</th>
						<th>添加时间</th>
						<th width="130"></th>
					</tr>
					<!-- loop from=$rslist key=$key value=$value -->
					<tr>
						<td>{$value.id}</td>
						<td><a href="{$value.filename}" target="_blank"><img src="{$value.ico}" style="width:50px;" /></a></td>
						<td>{$value.title}<br />{$value.filename}</td>
						<td>{func time_format $value.addtime}</td>
						<td>
							<div class="btn-group" role="group" aria-label="">
								<a class="btn btn-primary btn-sm" href="{$value.filename}" target="_blank">查看</a>
								<button type="button" class="btn btn-danger btn-sm" onclick="$.common.res_delete('{$value.id}')">删除</button>
							</div>
						</td>
					</tr>
					<!-- /loop -->
					</table>
					<div class="mt-3">
						<!-- include tpl=usercp/pagelist -->
					</div>
					
				</div>
			</div>
		</div>
	</div>
</div>
<!-- include tpl=usercp/foot -->